public class J10fuhe2 {
    public static void main(String[] args) {
        short s1 = 2;
        // int类型
        //当小范围数据和大范围数据一起运算的时候，会自动把小范围转为大范围
        s1 = (short)(s1 + 1);
        System.out.println("s1 = " + s1);

        System.out.println("=====");
        short s2 = 3;
        //复合运算符，自带强转
        s2 += 4;// s2 = s2 + 4
        System.out.println("s2 = " + s2);

        // 定义或者修改的时候，不必强转
        byte b1 = (byte)4;
        byte b2 = 4;
        b2 = 66;
    }
}
